package idiet.service;

import idiet.bean.CustomerNurse;
import idiet.bean.CustomerNurseTrace;
import idiet.dao.hibernate.CustomerNurseTraceDao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("customerNurseTraceService")
public class CustomerNurseTraceService {
	@Autowired
	CustomerNurseTraceDao customerNurseTraceDao;
	public CustomerNurseTrace getCustomerNurseTraceById(int customerNurseTraceId){
		return this.customerNurseTraceDao.getCustomerNurseTraceById(customerNurseTraceId);
	}
	public List<CustomerNurseTrace> getCustomerNurseTraces(CustomerNurse customerNurse){
		return null;
	}
	public List<CustomerNurseTrace> getCustomerNurseTracesByCustomerNurseTraceName(String customerNurseTraceName){
		if(customerNurseTraceName==null){
			return this.customerNurseTraceDao.getCustomerNurseTraces();
		}else{
			return this.customerNurseTraceDao.getCustomerNurseTracesByCustomerNurseTraceName(customerNurseTraceName);
		}
	}
	public void createCustomerNurseTrace(CustomerNurseTrace customerNurseTrace){
		this.customerNurseTraceDao.createCustomerNurseTrace(customerNurseTrace);
	}
	public void updateCustomerNurseTrace(CustomerNurseTrace customerNurseTrace){
		this.customerNurseTraceDao.updateCustomerNurseTrace(customerNurseTrace);
	}
	public void deleteCustomerNurseTrace(CustomerNurseTrace customerNurseTrace){
		this.customerNurseTraceDao.deleteCustomerNurseTrace(customerNurseTrace);
	}
}
